package com.welsmann.app.start.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * 网址类
 * @author Welsmann
 */
@Entity
@Table(name = "site")
public class Site extends BaseEntity{

	private static final long serialVersionUID = 6681105499049007168L;
	
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false, length = 32)
	private String id;
	
	@Column(name = "title", nullable = false, length = 50)
	private String title;
	
	@Column(name = "alias", nullable = false, length = 50)
	private String alias;
	
	@Column(name = "url", nullable = false, length = 500)
	private String url;
	
	@Column(name = "type", nullable = false, length = 32)
	private String type;
	
	@Column(name = "count", nullable = false, length = 9)
	private int count;
	
	public Site() {
		
	}
	
	public Site(String id) {
		this.id = id;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	public String getAlias() {
		return alias;
	}
	
	public void setAlias(String alias) {
		this.alias = alias;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}
	
}
